﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="EditCustomerInfo.ascx.cs"
    Inherits="UserControls_EditCustomerInfo" %>
<%@ Register Assembly="Infragistics2.WebUI.WebDataInput.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.WebDataInput" TagPrefix="igtxt" %>
<%@ Register Assembly="Shove.Web.UI.4 For.NET 2.0" Namespace="Shove.Web.UI" TagPrefix="ShoveWebUI" %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<script language="javascript" type="text/javascript">
    function IsNull()
    {
        if (document.getElementById('<%=this.txtUserName.ClientID%>').value=="")
        {
            alert("请输入姓名！");
            return false;
        }
        if (document.getElementById('<%=this.txtEmail.ClientID%>').value=="")
        {
            alert("请输入Email！");
            return false;
        }
    }
    
    function  ddlProvinceChange(e)
    {
        var dt = Ajax.ShopCustomer.GetCity(e.value).value;
        document.getElementById('<%=this.ddlCity.ClientID%>').length=0;
        
        for(var i=0; i<dt.Rows.length; i++)
            {
                var name=dt.Rows[i]["Name"];             
                var id=dt.Rows[i]["ID"];
                
               document.getElementById('<%=this.ddlCity.ClientID%>').options.add(new Option(name,id));
            }
    }

</script>

<table width="770" border="0" cellpadding="0" cellspacing="1" bgcolor="C5E4FF" style="text-align: left;">
    <tr>
        <td valign="top" bgcolor="#FFFFFF">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="3%" height="35" background="images/UserControls/bgbg.jpg">
                        <div align="center">
                            <img src="images/UserControls/dddd.jpg" width="9" height="27" /></div>
                    </td>
                    <td width="97%" background="images/UserControls/bgbg.jpg" class="STYLE3">
                        会员信息
                    </td>
                </tr>
                <tr>
                    <td height="1" bgcolor="C5E4FF">
                    </td>
                    <td bgcolor="C5E4FF">
                    </td>
                </tr>
            </table>
             <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="15%" height="26" align="right" id="tdname" runat="server">
                        用户名：
                    </td>
                    <td colspan="2"  align="left" id="tdname1" runat="server">
                        <label>
                            &nbsp;<asp:Label ID="lbUserName" runat="server" Text="Label"></asp:Label><span class="red"></span></label>
                    </td>
                </tr>
                <tr>
                    <td width="15%" height="26" align="right" id="tdrealName" runat="server">
                        姓名：
                    </td>
                    <td colspan="2"  align="left" id="tdrealName1" runat="server">
                        <label>
                            &nbsp;<asp:TextBox ID="txtUserName" runat="server" ></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfvUserName" runat="server" ControlToValidate="txtUserName"
                                ErrorMessage="必填"></asp:RequiredFieldValidator><span class="red"></span></label>
                    </td>
                </tr>
                <tr>
                    <td height="26" align="right" id="tdsex" runat="server">
                        性别：
                    </td>
                    <td colspan="2" id="tdsex1" runat="server" align="left" valign="middle">
                        <asp:RadioButtonList ID="rblSex" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True">男</asp:ListItem>
                            <asp:ListItem>女</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td height="26" align="right" id="tddate" runat="server">
                        出生日期：
                    </td>
                    <td colspan="2" align="left">
                        <label>
                            <igtxt:WebDateTimeEdit ID="txtBirthday" runat="server" >
                            </igtxt:WebDateTimeEdit>
                        </label>
                    </td>
                </tr>
                <tr>
                    <td height="26" align="right" id="tdemail" runat="server">
                        E-MAIL地址：
                    </td>
                    <td colspan="2" id="tdemail1" runat="server" align="left">
                        &nbsp;<asp:TextBox ID="txtEmail" runat="server" ></asp:TextBox><span
                            class="red">* </span>很重要！订单、发货等信息都会发送到此信箱
                    </td>
                </tr>
                <tr>
                    <td height="26" align="right" id="tdmobil" runat="server">
                        移动电话：
                    </td>
                    <td colspan="2" align="left" id="tdmobil1" runat="server">
                        <asp:TextBox ID="txtMobile" runat="server" ></asp:TextBox>
                        <asp:RegularExpressionValidator ID="revTel2" runat="server" ControlToValidate="txtMobile"
                            ErrorMessage="号码错误！" ValidationExpression="(13|15)\d{9}"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td height="26" align="right" id="tdtel" runat="server">
                        固定电话：
                    </td>
                    <td colspan="2" align="left" id="tdtel1" runat="server">
                        <asp:TextBox ID="txtTel" runat="server" ></asp:TextBox>
                        <asp:RegularExpressionValidator ID="revTel1" runat="server" ControlToValidate="txtTel"
                            ErrorMessage="号码错误！" ValidationExpression="\d{3}-\d{8}|\d{4}-\d{8}|\d{4}-\d{7}"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td height="26" align="right" id="tdcode" runat="server">
                        邮政编码：
                    </td>
                    <td colspan="2" align="left" id="tdcode1" runat="server">
                        <asp:TextBox ID="txtZipCode" runat="server" ></asp:TextBox>
                        <asp:RegularExpressionValidator ID="revPostCode" runat="server" ControlToValidate="txtZipCode"
                            ErrorMessage="邮政编码错误！" ValidationExpression="\d{6}"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td height="26" align="right" id="tdaddress" runat="server">
                        地区：
                    </td>
                    <td colspan="2" align="left">
                        <asp:DropDownList ID="ddlProvince" runat="server" Width="100px">
                        </asp:DropDownList>
                        <asp:DropDownList ID="ddlCity" runat="server" Width="120px">
                        </asp:DropDownList>
                    </td>
                </tr>
    <tr>
        <td height="26" align="right" class="black12">
            联系地址：
        </td>
        <td colspan="2" align="left">
            <asp:TextBox ID="txtAddress" runat="server" Width="283px" CssClass="in_p2"></asp:TextBox>
        </td>
    </tr>
    <tr>
        <td height="5" colspan="3" align="right" class="black12">
        </td>
    </tr>
    <tr>
        <td height="26" align="right" class="black12">
            &nbsp;
        </td>
        <td width="11%">
            <label>
                <asp:ImageButton ID="ibOK" runat="server" ImageUrl="~/images/UserControls/button_ok.jpg" OnClick="ibOK_Click1"
                    OnClientClick="return IsNull()" /><a href="#"></a></label>
        </td>
        <td width="74%" align="left">
            <label>
                <asp:ImageButton ID="ibCancel" runat="server" ImageUrl="~/images/UserControls/button_qx.jpg" /><a
                    href="#"></a></label>
        </td>
    </tr>
</table>
        </td>
    </tr>
</table>

 